import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { SupplierTableComponent } from './pages/supplier-table/supplier-table.component';
import { SupplierDetailComponent } from './pages/supplier-detail/supplier-detail.component';


const routes: Routes = [
    {
        path: 'supplier', component: SupplierTableComponent, data: {
            breadcrumbs: [{ title: '供应商信息' }]
        },
        children: [
            {
                path: 'detail', component: SupplierDetailComponent, data: {
                    breadcrumbs: [{ title: '供应商信息', path: '/supplier/supplier' }, { title: '新增供应商' }]
                }
            },
            {
                path: 'detail/:id', component: SupplierDetailComponent, data: {
                    breadcrumbs: [{ title: '供应商信息', path: '/supplier/supplier' }, { title: '供应商信息详情' }]
                }
            },
        ]

    }
];

export const declarationComponents = [
    SupplierTableComponent,
    SupplierDetailComponent,
];

export const entryComponents = [
];

@NgModule({
    imports: [
        RouterModule.forChild(routes)
    ],
    exports: [
        RouterModule
    ]
})
export class SupplierRoutingModule { }
